<!doctype thml>
<html>
    <head>
     <meta charset="utf-8"/>
        <script src="util.js"></script>
    </head>
    <body>
    <!-- 为 ECharts 准备一个具备大小（宽高）的 DOM -->
    <div id="main" style="width: 600px;height:300px; border:1px #FFFFFF solid"></div>
    </body>
    <script type="text/javascript">
    var stringJson=obj.jsonData();
    var json=JSON.parse(stringJson);


        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
  // 指定图表的配置项和数据
         var option = {
			  legend: {}, 
               tooltip: {},
    xAxis: [
        {
            type: 'category',
            axisTick: {
                alignWithLabel: true
            },
            data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
        }
    ],
	    
    yAxis: [
           {  
			 min: 0,
            max: 5,
            position: 'right',
			boundaryGap: false,
			data:[0,1,2,3,4,5]
			},
			{ type:'category',
              splitLine:{show: true}, 
               name:'道路拥堵状况',
				data:['畅通','缓行','一般拥堵','中度拥堵','严重拥堵'],
				min: 0,
            max: 4,
            position: 'left',
           },
       ],

	        
    // Declare several bar series, each will be mapped
    // to a column of dataset.source by default.
   series: [ 
   {        name: '学院路',
            type: 'bar',
            data: json,
        },
      {
       name:'联想路',
      type: 'bar',               
     data: json,
      },
      {
      name:'医院路',
      type: 'bar',                
     data: json,
      },
      {
      name:'幸福路',
      type: 'bar',
      data: json,
      },
      {
      name:'环城快速路',
      type: 'bar',
      data: json,
      },
      {
      name:'环城高速',
      type: 'bar',
      data: json,
      },
      {
      name:'停车场',
      type: 'bar',   
      data: json
	  
                   }]
};

  // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
  </script>
</html>

